package com.ruoyi.transfer_log.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.transfer_log.mapper.TransferLogMapper;
import com.ruoyi.transfer_log.domain.TransferLog;
import com.ruoyi.transfer_log.service.ITransferLogService;

/**
 * 交易日志Service业务层处理
 * 
 * @author 张富饶
 * @date 2025-05-21
 */
@Service
public class TransferLogServiceImpl implements ITransferLogService 
{
    @Autowired
    private TransferLogMapper transferLogMapper;

    /**
     * 查询交易日志
     * 
     * @param id 交易日志主键
     * @return 交易日志
     */
    @Override
    public TransferLog selectTransferLogById(Long id)
    {
        return transferLogMapper.selectTransferLogById(id);
    }

    /**
     * 查询交易日志列表
     * 
     * @param transferLog 交易日志
     * @return 交易日志
     */
    @Override
    public List<TransferLog> selectTransferLogList(TransferLog transferLog)
    {
        return transferLogMapper.selectTransferLogList(transferLog);
    }

    /**
     * 新增交易日志
     * 
     * @param transferLog 交易日志
     * @return 结果
     */
    @Override
    public int insertTransferLog(TransferLog transferLog)
    {
        transferLog.setCreateTime(DateUtils.getNowDate());
        return transferLogMapper.insertTransferLog(transferLog);
    }

    /**
     * 修改交易日志
     * 
     * @param transferLog 交易日志
     * @return 结果
     */
    @Override
    public int updateTransferLog(TransferLog transferLog)
    {
        return transferLogMapper.updateTransferLog(transferLog);
    }

    /**
     * 批量删除交易日志
     * 
     * @param ids 需要删除的交易日志主键
     * @return 结果
     */
    @Override
    public int deleteTransferLogByIds(Long[] ids)
    {
        return transferLogMapper.deleteTransferLogByIds(ids);
    }

    /**
     * 删除交易日志信息
     * 
     * @param id 交易日志主键
     * @return 结果
     */
    @Override
    public int deleteTransferLogById(Long id)
    {
        return transferLogMapper.deleteTransferLogById(id);
    }
}
